<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('取货码列表')" />
    <script src='http://www.lodop.net/demolist/LodopFuncs.js?name=CLODOPA'></script>
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>批次ID：</label>
                                <input type="text" name="batchId"/>
                            </li>
                            <li>
                                <label>取货码：</label>
                                <input type="text" name="pickCode"/>
                            </li>
                            <li>
                                <label>机器ID：</label>
                                <input type="text" name="machineId"/>
                            </li>
                            <li>
                                <label>机器名称：</label>
                                <input type="text" name="machineName"/>
                            </li>
                            <li>
                                <label>商品ID：</label>
                                <input type="text" name="productId"/>
                            </li>
                            <li>
                                <label>商品名称：</label>
                                <input type="text" name="productName"/>
                            </li>
                            <li>
                                <label>有效起始日期：</label>
                                <input type="text" class="time-input" placeholder="请选择有效起始日期" name="effectiveStartDate"/>
                            </li>
                            <li>
                                <label>有效截止日期：</label>
                                <input type="text" class="time-input" placeholder="请选择有效截止日期" name="effectiveEndDate"/>
                            </li>
                            <li>
                                <label>状态：</label>
                                <select name="status" th:with="type=${@dict.getType('pick_code_status')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <!-- a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="business:pickCode:add">
                    <i class="fa fa-plus"></i> 添加
                </a-->
                <!-- a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="business:pickCode:edit">
                    <i class="fa fa-edit"></i> 修改
                </a-->
                <a class="btn btn-danger multiple disabled" onclick="$.operate.blockAll()" shiro:hasPermission="business:pickCode:block">
                    <i class="fa fa-remove"></i> 停用
                </a>
                <a class="btn btn-success multiple disabled" onclick="$.operate.activeAll()" shiro:hasPermission="business:pickCode:block">
                    <i class="fa fa-star"></i> 启用
                </a>
                <a class="btn btn-success multiple disabled" onclick="print()" shiro:hasPermission="business:pickCode:block">
                    <i class="fa fa-star"></i> 打印
                </a>
                <a class="btn btn-success multiple disabled" onclick="printSingle()" shiro:hasPermission="business:pickCode:block">
                    <i class="fa fa-star"></i> 打印（单张）
                </a>
                <a class="btn btn-success multiple disabled" onclick="generateFile()" shiro:hasPermission="business:pickCode:block">
                    <i class="fa fa-star"></i> 生成图片
                </a>
                <a class="btn btn-success multiple disabled" onclick="generateFileSingle()" shiro:hasPermission="business:pickCode:block">
                    <i class="fa fa-star"></i> 生成图片（单张）
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="business:pickCode:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="business:pickCode:export">
                    <i class="fa fa-download"></i> 导出
                </a>
                <a class="btn btn-success" onclick="printDesign()" shiro:hasPermission="business:pickCode:block">
                    <i class="fa fa-star"></i> 打印设计
                </a>
                <a class="btn btn-success" onclick="printDesignSingle()" shiro:hasPermission="business:pickCode:block">
                    <i class="fa fa-star"></i> 打印设计(单张)
                </a>
                <!--a class="btn btn-success" onclick="printSetup()" shiro:hasPermission="business:pickCode:block">
                    <i class="fa fa-star"></i> 打印维护
                </a-->
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('business:pickCode:edit')}]];
        var removeFlag = [[${@permission.hasPermi('business:pickCode:remove')}]];
        var statusDatas = [[${@dict.getType('pick_code_status')}]];
        var prefix = ctx + "business/pickCode";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                blockUrl: prefix + "/block",
                activeUrl: prefix + "/active",
                exportUrl: prefix + "/export",
                modalName: "取货码",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'pickId',
                    title: '取货码ID',
                    visible: false
                },
                {
                    field: 'batchId',
                    title: '批次ID'
                },
                {
                    field: 'pickCode',
                    title: '取货码'
                },
                {
                    field: 'machineId',
                    title: '机器ID'
                },
                {
                    field: 'machineName',
                    title: '机器名称'
                },
                {
                    field: 'productId',
                    title: '商品ID'
                },
                {
                    field: 'productName',
                    title: '商品名称'
                },
                {
                    field: 'effectiveStartDate',
                    title: '有效起始日期'
                },
                {
                    field: 'effectiveEndDate',
                    title: '有效截止日期'
                },
                {
                    field: 'status',
                    title: '状态',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(statusDatas, value);
                    }
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.pickId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.pickId + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
        var LODOP;
        function print(){
        	table.set();
        	var pickCodes = $.table.selectColumnsAll("pickCode");
        	var effectiveEndDates = $.table.selectColumnsAll("effectiveEndDate");
        	var productNames = $.table.selectColumnsAll("productName");
        	createDataBill1(pickCodes,effectiveEndDates,productNames);
        	LODOP.PREVIEW();
        }
        function printSingle(){
        	table.set();
        	var pickCodes = $.table.selectColumnsAll("pickCode");
        	var effectiveEndDates = $.table.selectColumnsAll("effectiveEndDate");
        	var productNames = $.table.selectColumnsAll("productName");
        	createDataBillSingle(pickCodes,effectiveEndDates,productNames);
        	LODOP.PREVIEW();
        }
        function printDesign() {
        	var pickCodes = $.table.selectColumnsAll("pickCode");
        	var effectiveEndDates = $.table.selectColumnsAll("effectiveEndDate");
        	var productNames = $.table.selectColumnsAll("productName");
        	createDataBill1(pickCodes,effectiveEndDates,productNames);
    		LODOP.PRINT_DESIGN();
    	};
    	function printDesignSingle(){
    		var pickCodes = $.table.selectColumnsAll("pickCode");
        	var effectiveEndDates = $.table.selectColumnsAll("effectiveEndDate");
        	var productNames = $.table.selectColumnsAll("productName");
        	createDataBillSingle(pickCodes,effectiveEndDates,productNames);
    		LODOP.PRINT_DESIGN();
    	}
    	function printSetup() {
    		createDataBill();
    		LODOP.PRINT_SETUP();
    	};
    	function generateFile(){
    		table.set();
        	var pickCodes = $.table.selectColumnsAll("pickCode");
        	var effectiveEndDates = $.table.selectColumnsAll("effectiveEndDate");
        	var productNames = $.table.selectColumnsAll("productName");
        	createDataBill1(pickCodes,effectiveEndDates,productNames);
        	LODOP.SET_SHOW_MODE("BKIMG_PRINT",true);
        	LODOP.SET_SAVE_MODE("SAVEAS_IMGFILE_EXENAME",".png");
    		LODOP.SAVE_TO_FILE("打印下载.png");
    	}
    	function generateFileSingle(){
    		table.set();
        	var pickCodes = $.table.selectColumnsAll("pickCode");
        	var effectiveEndDates = $.table.selectColumnsAll("effectiveEndDate");
        	var productNames = $.table.selectColumnsAll("productName");
        	createDataBillSingle(pickCodes,effectiveEndDates,productNames);
        	LODOP.SET_SHOW_MODE("BKIMG_PRINT",true);
        	LODOP.SET_SAVE_MODE("SAVEAS_IMGFILE_EXENAME",".png");
    		LODOP.SAVE_TO_FILE("打印下载.png");
    	}
    	
    	function createDataBill(pickCodes,effectiveEndDates,productNames) {
    		var x = 1696;
    		var y = 802;
    		LODOP.PRINT_INITA(0,0,3508,2480,"");//3508,2480
    		LODOP.SET_PRINT_PAGESIZE(1,2970,2100,"");
    		//LODOP.ADD_PRINT_SETUP_BKIMG("<img border='0' src='/img/printBg.jpg' >");
    		LODOP.ADD_PRINT_SETUP_BKIMG("C:\\printBg.jpg");
    		LODOP.SET_PRINT_STYLEA(0,"Stretch",1);
    		//LODOP.SET_SHOW_MODE("BKIMG_WIDTH","3508");
    		//LODOP.SET_SHOW_MODE("BKIMG_HEIGHT","210mm");
    		LODOP.SET_SHOW_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
    		LODOP.SET_SHOW_MODE("FULL_HEIGHT_FOR_OVERFLOW",true);
    		LODOP.SET_SHOW_MODE("PRINT_PAGE_PERCENT","Full-Page");
    		LODOP.SET_SHOW_MODE("BKIMG_IN_PREVIEW",true);
    		LODOP.SET_SHOW_MODE("BKIMG_PRINT",true);
    		for(var i=0;i<pickCodes.length;i=i+6){
    			if(i%6==0){
    				if(i>0){
    					LODOP.NewPage();
    				}
    				if(i<pickCodes.length){
    					LODOP.ADD_PRINT_TEXT(435,1098,80,50,effectiveEndDates[i].split("-")[0]);
    		    		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
    		    		LODOP.ADD_PRINT_TEXT(435,1220,70,50,effectiveEndDates[i].split("-")[1]);
    		    		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
    		    		LODOP.ADD_PRINT_TEXT(435,1324,70,50,effectiveEndDates[i].split("-")[2]);
    		    		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
    		    		LODOP.ADD_PRINT_TEXT(628,1060,380,60,productNames[i]);
    		    		LODOP.SET_PRINT_STYLEA(0,"FontSize",36);
    		    		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
    		    		LODOP.ADD_PRINT_TEXT(700,1060,380,60,pickCodes[i]);
    		    		LODOP.SET_PRINT_STYLEA(0,"FontSize",36);
    		    		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		console.log(pickCodes[i]);
    				}
    				
    				if(i+1<pickCodes.length){
    					LODOP.ADD_PRINT_TEXT(435,1098+x,80,50,effectiveEndDates[i+1].split("-")[0]);
    					LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        	    		LODOP.ADD_PRINT_TEXT(435,1220+x,70,50,effectiveEndDates[i+1].split("-")[1]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        	    		LODOP.ADD_PRINT_TEXT(435,1324+x,70,50,effectiveEndDates[i+1].split("-")[2]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        	    		LODOP.ADD_PRINT_TEXT(628,1060+x,380,60,productNames[i+1]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",36);
    		    		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(700,1060+x,380,60,pickCodes[i+1]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",36);
    		    		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		console.log(pickCodes[i+1]);
    				}
    				
    				if(i+2<pickCodes.length){
    					LODOP.ADD_PRINT_TEXT(435+y,1098,80,50,effectiveEndDates[i+2].split("-")[0]);
    					LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        	    		LODOP.ADD_PRINT_TEXT(435+y,1220,70,50,effectiveEndDates[i+2].split("-")[1]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        	    		LODOP.ADD_PRINT_TEXT(435+y,1324,70,50,effectiveEndDates[i+2].split("-")[2]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        	    		LODOP.ADD_PRINT_TEXT(628+y,1060,380,60,productNames[i+2]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",36);
    		    		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(700+y,1060,380,60,pickCodes[i+2]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",36);
    		    		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		console.log(pickCodes[i+2]);
    				}
    				
    				if(i+3<pickCodes.length){
    					LODOP.ADD_PRINT_TEXT(435+y,1098+x,80,50,effectiveEndDates[i+3].split("-")[0]);
    					LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        	    		LODOP.ADD_PRINT_TEXT(435+y,1220+x,70,50,effectiveEndDates[i+3].split("-")[1]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        	    		LODOP.ADD_PRINT_TEXT(435+y,1324+x,70,50,effectiveEndDates[i+3].split("-")[2]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        	    		LODOP.ADD_PRINT_TEXT(628+y,1060+x,380,60,productNames[i+3]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",36);
    		    		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(700+y,1060+x,380,60,pickCodes[i+3]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",36);
    		    		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		console.log(pickCodes[i+3]);
    				}
    				
    				if(i+4<pickCodes.length){
    					LODOP.ADD_PRINT_TEXT(435+y*2,1098,80,50,effectiveEndDates[i+4].split("-")[0]);
    					LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        	    		LODOP.ADD_PRINT_TEXT(435+y*2,1220,70,50,effectiveEndDates[i+4].split("-")[1]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        	    		LODOP.ADD_PRINT_TEXT(435+y*2,1324,70,50,effectiveEndDates[i+4].split("-")[2]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        	    		LODOP.ADD_PRINT_TEXT(628+y*2,1060,380,60,productNames[i+4]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",36);
    		    		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(700+y*2,1060,380,60,pickCodes[i+4]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",36);
    		    		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		console.log(pickCodes[i+4]);
    				}
    				
    				if(i+5<pickCodes.length){
    					LODOP.ADD_PRINT_TEXT(435+y*2,1098+x,80,50,effectiveEndDates[i+5].split("-")[0]);
    					LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        	    		LODOP.ADD_PRINT_TEXT(435+y*2,1220+x,70,50,effectiveEndDates[i+5].split("-")[1]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        	    		LODOP.ADD_PRINT_TEXT(435+y*2,1324+x,70,50,effectiveEndDates[i+5].split("-")[2]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        	    		LODOP.ADD_PRINT_TEXT(628+y*2,1060+x,380,60,productNames[i+5]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",36);
    		    		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(700+y*2,1060+x,380,60,pickCodes[i+5]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",36);
    		    		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		console.log(pickCodes[i+5]);
    				}
    	    		
    			}
    		}
    	}
    	
    	function createDataBill1(pickCodes,effectiveEndDates,productNames) {
    		var x = 544;
    		var y = 255;
    		LODOP.PRINT_INITA(0,0,2970,2100,"");
    		LODOP.SET_PRINT_PAGESIZE(1,2970,2100,"");
    		//LODOP.ADD_PRINT_SETUP_BKIMG("<img border='0' src='/img/printBg.jpg' >");
    		LODOP.ADD_PRINT_SETUP_BKIMG("C:\\printBg.jpg");
    		LODOP.SET_PRINT_STYLEA(0,"Stretch",1);
    		LODOP.SET_SHOW_MODE("BKIMG_WIDTH","297mm");
    		LODOP.SET_SHOW_MODE("BKIMG_HEIGHT","210mm");
    		LODOP.SET_SHOW_MODE("BKIMG_IN_PREVIEW",true);
    		LODOP.SET_SHOW_MODE("BKIMG_PRINT",true);
    		for(var i=0;i<pickCodes.length;i=i+6){
    			if(i%6==0){
    				if(i>0){
    					LODOP.NewPage();
    				}
    				if(i<pickCodes.length){
    					LODOP.ADD_PRINT_TEXT(136,350,55,20,effectiveEndDates[i].split("-")[0]);
    					LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
    					LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(136,394,50,20,effectiveEndDates[i].split("-")[1]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(136,426,50,20,effectiveEndDates[i].split("-")[2]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(200,346,250,20,productNames[i]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(227,346,250,20,pickCodes[i]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
    				}
    				
    				if(i+1<pickCodes.length){
    					LODOP.ADD_PRINT_TEXT(136,350+x,55,20,effectiveEndDates[i+1].split("-")[0]);
    					LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
    					LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(136,394+x,50,20,effectiveEndDates[i+1].split("-")[1]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(136,426+x,50,20,effectiveEndDates[i+1].split("-")[2]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(200,346+x,250,20,productNames[i+1]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(227,346+x,250,20,pickCodes[i+1]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
    				}
    	    		
    				if(i+2<pickCodes.length){
    					LODOP.ADD_PRINT_TEXT(136+y,350,55,20,effectiveEndDates[i+2].split("-")[0]);
    					LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
    					LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(136+y,394,50,20,effectiveEndDates[i+2].split("-")[1]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(136+y,426,50,20,effectiveEndDates[i+2].split("-")[2]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(200+y,346,250,20,productNames[i+2]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(227+y,346,250,20,pickCodes[i+2]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
    				}
    	    		
    				if(i+3<pickCodes.length){
    					LODOP.ADD_PRINT_TEXT(136+y,350+x,55,20,effectiveEndDates[i+3].split("-")[0]);
    					LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
    					LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(136+y,394+x,50,20,effectiveEndDates[i+3].split("-")[1]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(136+y,426+x,50,20,effectiveEndDates[i+3].split("-")[2]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(200+y,346+x,250,20,productNames[i+3]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(227+y,346+x,250,20,pickCodes[i+3]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
    				}
    	    		
    				if(i+4<pickCodes.length){
    					LODOP.ADD_PRINT_TEXT(136+y*2,350,55,20,effectiveEndDates[i+4].split("-")[0]);
    					LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
    					LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(136+y*2,394,50,20,effectiveEndDates[i+4].split("-")[1]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(136+y*2,426,50,20,effectiveEndDates[i+4].split("-")[2]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(200+y*2,346,250,20,productNames[i+4]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(227+y*2,346,250,20,pickCodes[i+4]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
    				}
    	    		
    				if(i+5<pickCodes.length){
    					LODOP.ADD_PRINT_TEXT(136+y*2,350+x,55,20,effectiveEndDates[i+5].split("-")[0]);
    					LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
    					LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(136+y*2,394+x,50,20,effectiveEndDates[i+5].split("-")[1]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(136+y*2,426+x,50,20,effectiveEndDates[i+5].split("-")[2]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(200+y*2,346+x,250,20,productNames[i+5]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        	    		LODOP.ADD_PRINT_TEXT(227+y*2,346+x,250,20,pickCodes[i+5]);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
        	    		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
    					LODOP.SET_PRINT_STYLEA(0,"Bold",1);
    				}
    	    		
    			}
    		}
    	}
    	
    	function createDataBillSingle(pickCodes,effectiveEndDates,productNames) {
    		LODOP.PRINT_INITA(0,0,1772,827,"");
    		//LODOP.SET_PRINT_PAGESIZE(1,2970,2100,"");
    		//LODOP.ADD_PRINT_SETUP_BKIMG("<img border='0' src='/img/printBg1.jpg' >");
    		LODOP.ADD_PRINT_SETUP_BKIMG("C:\\printBg1.jpg");
    		LODOP.SET_SHOW_MODE("BKIMG_IN_PREVIEW",true);
    		LODOP.SET_PRINT_STYLEA(0,"Stretch",1);
    		LODOP.SET_SHOW_MODE("BKIMG_WIDTH","297mm");
    		LODOP.SET_SHOW_MODE("BKIMG_IN_PREVIEW",true);
    		LODOP.SET_SHOW_MODE("BKIMG_PRINT",true);
    		for(var i=0;i<pickCodes.length;i++){
    			LODOP.NewPage();
    			LODOP.ADD_PRINT_TEXT(242,675,100,40,effectiveEndDates[i].split("-")[0]);
        		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
				LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        		LODOP.ADD_PRINT_TEXT(242,783,53,40,effectiveEndDates[i].split("-")[1]);
        		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
				LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        		LODOP.ADD_PRINT_TEXT(242,859,53,40,effectiveEndDates[i].split("-")[2]);
        		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
				LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        		LODOP.ADD_PRINT_TEXT(370,670,500,50,productNames[i]);
        		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
				LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        		LODOP.ADD_PRINT_TEXT(421,670,500,50,pickCodes[i]);
        		LODOP.SET_PRINT_STYLEA(0,"FontSize",25);
        		LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
				LODOP.SET_PRINT_STYLEA(0,"Bold",1);
    		}
    	}
    </script>
</body>
</html>